
<%
	out.println("<script type=\"text/javascript\">");
	String[][] test = (String[][]) getServletContext().getAttribute("GoogleMapsInfo");

	out.println("console.log(" + test.length + ")");
	out.println("console.log(" + test[0].length + ")");

	// 	for (int i = 0; i < 5; i++) {
	// 		String Year = test[i][0].substring(0, 1);
	// 		String Level = test[i][0].substring(1, 2);

	// 		String ClassNumber = test[i][0].substring(2, 3);

	// 	}

	//Make Markersgroup:
	out.println("var markerGroups = {");
	out.println("\"iconCollege\" : [],");
	// 	out.println("};");
	for (int f = 0; f < 10000; f++) {
		// 		out.println("Student naam: "+test[f][1]+" - "+test[f][2]+"<br/>");
		if (f == test.length) {
			break;

		} else if (f == (test.length - 1)) {
			
			try {
				// 			out.println("console.log(\"Klas"+test[f][0]+" : [],\")");
				if((!test[f][0].equals(test[f-1][0])) && (f>0)){
				out.println("\"Klas" + test[f][0] + "\" : []");
				}
			} catch (NullPointerException e) {
				e.printStackTrace();
			}
		} else {

			try {
				// 			out.println("console.log(\"Klas"+test[f][0]+" : [],\")");
				out.println("\"Klas" + test[f][0] + "\" : [],");
			} catch (NullPointerException e) {
				e.printStackTrace();
			}
		}
	}
	out.println("};");
	out.println("console.log(markerGroups);");
	
	
	// maak javascript array store_locations en vul het met de JAVA array
	out.println("var store_locations = new Array();");
	out.println("store_locations[0] = new Array();");
	//store_locations[0][0] = "bar";
	out.println("store_locations[0][0] = \"iconCollege\";");
	out.println("store_locations[0][1] = \"52.022500\";");
	out.println("store_locations[0][2] = \"4.7220571\";");
	out.println("store_locations[0][3] = \"College\";");
	out.println("store_locations[0][4] = \"address\";");
	out.println("store_locations[0][5] = \"0\";");
	for (int f = 1; f < 10000; f++) {
		if (f == test.length) {
			break;

		} else {
			try {
				out.println("store_locations["+f+"] = new Array();");
// 				out.println("store_locations["+f+"][0] = \"iconCollege\";");
				out.println("store_locations["+f+"][0] = \"Klas"+test[f][0]+"\";");
				out.println("store_locations["+f+"][1] = \""+test[f][1]+"\";");
				out.println("store_locations["+f+"][2] = \""+test[f][2]+"\";");
				out.println("store_locations["+f+"][3] = \""+test[f][3]+"\";");
				out.println("store_locations["+f+"][4] = \""+test[f][4]+"\";");
				out.println("store_locations["+f+"][5] = \""+test[f][5]+"\";");
			} catch (NullPointerException e) {
				e.printStackTrace();
			}
		}
	}
	
	
	
	out.println("</script>");
%>
<script type="text/javascript"
	src="include/Javascript/GoogleMapsIcons.js"></script>
<script type="text/javascript"
	src="include/Javascript/GoogleMapsSettings2.js"></script>

